import request from '/@/utils/request';

// 查询小区内的房屋列信息列表
export function listRoom(query?: Object) {
  return request({
    url: '/module/estate/room/list',
    method: 'get',
    params: query
  })
}

// 查询小区内的房屋列信息详细
export function getRoom(id?: number) {
  return request({
    url: '/module/estate/room/' + id,
    method: 'get'
  })
}

// 新增小区内的房屋列信息
export function addRoom(data?: Object) {
  return request({
    url: '/module/estate/room',
    method: 'post',
    data: data
  })
}

// 修改小区内的房屋列信息
export function updateRoom(data?: Object) {
  return request({
    url: '/module/estate/room',
    method: 'put',
    data: data
  })
}

// 删除小区内的房屋列信息
export function delRoom(id?: number) {
  return request({
    url: '/module/estate/room/' + id,
    method: 'delete'
  })
}

// 导出小区内的房屋列信息
export function exportRoom(query?: Object) {
  return request({
    url: '/module/estate/room/export',
    method: 'get',
    params: query
  })
}

// 导出小区内的房屋列信息
export function exportWater(query?: Object) {
  return request({
    url: '/module/estate/room/waterExport',
    method: 'get',
    params: query
  })
}

// 查询小区内的房屋列信息详细
export function getEstateRoom(query?: Object) {
  return request({
    url: '/module/estate/room/' + id,
    method: 'get'
  })
}

export function arrearageList(query?: Object) {
  return request({
    url: '/module/estate/room/arrearageList',
    method: 'get',
    params: query
  })
}
